<script setup lang="ts">
  import { ref } from 'vue';
  const checkList = ref([]);
  /*
   * @description 父组件传递的props属性
   * */
  const {
    label = '选项一',
    size = 'default',
    disabled = false,
    border = false,
    name = 'checkbox',
    value = 'defaultValue',
    validateEvent = true,
  } = defineProps<{
    label: string | number;
    size?: 'default' | 'small' | 'large';
    disabled?: boolean;
    border?: boolean;
    name?: string;
    value?: string | number | boolean | object;
    validateEvent?: boolean;
  }>();
</script>

<template>
  <div>
    <el-checkbox-group v-model="checkList">
      <el-checkbox
        :value="value"
        :label="label"
        :size="size"
        :disabled="disabled"
        :border="border"
        :name="name"
        :validateEvent="validateEvent"
      ></el-checkbox>
    </el-checkbox-group>
  </div>
</template>

<style scoped></style>
